import React, { useState } from "react";

export default function Ways() {
  const [wayName, setWayName] = useState("");
  const [person, setPerson] = useState("");
  const search = () => {
    console.log(wayName);
  };
  const wayNameChange = (e) => {
    setWayName(e.target.value);
  };
  const personChange = (e) => {
    setPerson(e.target.value);
  };
  return (
    <div className="search">
      <div>
        <span>筛选查询</span>
        <button onClick={search}>查询结果</button>
      </div>
      <div>
        <div>
          <span>路线名称：</span>
          <input
            type="text"
            placeholder="路线名称"
            value={wayName}
            onChange={wayNameChange}
          />
        </div>
        <div>
          <span>负责人员：</span>
          <input
            type="text"
            placeholder="负责人员"
            value={person}
            onChange={personChange}
          />
        </div>
      </div>
    </div>
  );
}
